<template>
  <div>
    <div v-if="tabStatus">
      <van-tabbar v-model="active" >
        <van-tabbar-item icon="home-o" to="/">首页</van-tabbar-item>
        <van-tabbar-item icon="shopping-cart-o" to="/order">订单</van-tabbar-item>
        <van-tabbar-item icon="user-o" to="/mine">我的</van-tabbar-item>
      </van-tabbar>
    </div>
  </div>
</template>

<script>
import Home from "@/components/Home.vue";

export default {
  name: "Main",
  components: {Home},
  data(){
    return{
      active: 0,
    }
  },
  computed:{
    tabStatus(){
      let name = this.$route.name;
      // alert(typeof name)
      return name === 'main' || name === 'order' || name === 'mine';
    }
  }
}
</script>

<style scoped>

</style>